

@RestController
@RequestMapping("/fmsRecipeCategory")
public class FmsRecipeCategoryController {

    @Resource
    private FmsRecipeCategoryService fmsRecipeCategoryService;


    /**
     * 获取 FmsRecipeCategory 分页列表
     */
    @GetMapping("/pagination")
    public Ret getFmsRecipeCategoryPagination( PaginationVo paginationVo, FmsRecipeCategoryQuery fmsRecipeCategoryQuery ) throws Exception {
        IPage page = fmsRecipeCategoryService.getFmsRecipeCategoryPagination(paginationVo, fmsRecipeCategoryQuery );
        return Ret.toPage(page);
    }


    /**
     * 获取 FmsRecipeCategory 所有数据
     */
    @GetMapping("/all")
    public Ret getFmsRecipeCategoryAllList( FmsRecipeCategoryQuery fmsRecipeCategoryQuery ) throws Exception {
        List<FmsRecipeCategoryEntity> list = fmsRecipeCategoryService.getFmsRecipeCategoryAllList( fmsRecipeCategoryQuery );
        return Ret.ok(list);
    }



    /**
     * 获取 FmsRecipeCategory 详情
    */
   @GetMapping("/{id}")
   public Ret getFmsRecipeCategoryDetail(@PathVariable Long id) throws Exception {

       FmsRecipeCategoryEntity fmsRecipeCategory = fmsRecipeCategoryService.getFmsRecipeCategoryDetail(id);
       return Ret.ok(fmsRecipeCategory);
   }


    /**
     * 新增 FmsRecipeCategory
     * */
    @PostMapping("")
    public Ret addFmsRecipeCategory(@RequestBody FmsRecipeCategoryVo fmsRecipeCategoryVo) throws Exception {

        fmsRecipeCategoryService.addFmsRecipeCategory(fmsRecipeCategoryVo);
        return Ret.ok();
    }


    /**
     * 更新 FmsRecipeCategory
     * */
    @PutMapping("")
    public Ret updateFmsRecipeCategory(@RequestBody FmsRecipeCategoryVo fmsRecipeCategoryVo) throws Exception {

        fmsRecipeCategoryService.updateFmsRecipeCategory(fmsRecipeCategoryVo);
        return Ret.ok();
    }


    /**
     * 删除 FmsRecipeCategory
     * */
    @PostMapping("/batchRemove")
    public Ret batchRemoveFmsRecipeCategory( @RequestBody List<Long> ids ) throws Exception {

        fmsRecipeCategoryService.batchRemoveFmsRecipeCategory(ids);
        return Ret.ok();
    }
}

  